package cn.com.cym.gamezao.entity.xmu.recruit;


import cn.com.cym.gamezao.base.BaseEntity;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.recruit.Job;
import cn.com.cym.gamezao.enums.ApplyStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.io.Serializable;

@Setter
@Getter
@NoArgsConstructor
@Table(name = "x_user_apply")
@Entity
@Accessors(chain = true)
@ApiModel(description = "用户申请")
public class UserApply extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 3875285689135292945L;


    @ManyToOne
    @JoinColumn(name = "user_id")
    @JsonProperty(access = JsonProperty.Access.READ_WRITE)
    private User user;

    @ManyToOne
    @JoinColumn(name = "job_id")
    @JsonProperty(access = JsonProperty.Access.READ_WRITE)
    private Job job;

    private ApplyStatus applyStatus = ApplyStatus.CREATE;
}
